package cn.tedu.spring;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Component
public class Product {

    @Value("无尽之刃")
    private String title;
    @Value("3600")
    private Integer num;
    private String comment;


    @Override
    public String toString() {
        return "Product{" +
                "title='" + title + '\'' +
                ", num=" + num +
                ", comment='" + comment + '\'' +
                '}';
    }


    @Value("一把无尽之刃,+100攻击力，+50暴击机率")
    public void setComment(String comment) {
        this.comment = comment;
    }
}

